/*
 * GameGui.h
 *
 *  Created on: Aug 25, 2011
 *      Author: PoZ
 */

#ifndef GUIMANAGER_H_
#define GUIMANAGER_H_

#include <string>
#include <hge/hge.h>
#include <hge/hgefont.h>
#include <hge/hgegui.h>
#include <hge/hgesprite.h>
#include <hge/hgeguictrls.h>

namespace projectcos
{

namespace gui
{

// Not using singleton for now. We maybe have multiple GUI instance for switching
class GuiManager
{
public:
	explicit GuiManager(HGE* hge);
	~GuiManager();

	// Utility functions. New Custom GUI feature should be added here
	void SetFont(std::string fontFile);
	hgeFont* GetFont();

	// hgeGUI wrapper functions
	void AddCtrl(hgeGUIObject* ctrl);
	void DelCtrl(int id);
	hgeGUIObject* GetCtrl(int id);
	void MoveCtrl(int id, float x, float y);
	void ShowCtrl(int id, bool visible);
	void EnableCtrl(int id, bool enable);

	void SetNavMode(int mode);
	void SetCursor(hgeSprite* sprite);
	void SetColor(DWORD color);
	void SetFocus(int id);
	int GetFocus();

	void Render();
/*
	static const int NAVMODE_NONAVKEYS;	// no keyboard navigation
	static const int NAVMODE_LEFTRIGHT;	// left and right arrow keys navigate through controls
	static const int NAVMODE_UPDOWN;		// up and down arrow keys navigate through controls
	static const int NAVMODE_CYCLED;		// the navigation is wrapped around
*/
protected:
private:

protected:
private:
	HGE* m_HGE;

	hgeGUI *m_hgeGUI;

	hgeFont *m_defaultFont;

};

} // namespace gui
} // namespace projectcos

#endif /* GUIMANAGER_H_ */
